<html>
<head>
    <title>SplashScreen.java</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <style type="text/css">
        .ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
        .s0 { color: rgb(0,0,128); font-weight: bold; }
        .s1 { }
        .s2 { color: rgb(128,128,128); font-style: italic; }
        .s3 { color: rgb(128,128,128); font-weight: bold; font-style: italic; }
        .s4 { color: rgb(0,0,255); }
    </style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0">
    <TR>
        <TD>
            <CENTER>
                <FONT FACE="Arial, Helvetica" COLOR="#000000">
                    SplashScreen.java</FONT>
            </center>
        </TD>
    </TR>
</TABLE>
<pre>

<a name="l1"><span class="ln">1    </span></a><span class="s0">package </span><span class="s1">com.ibr.ticketmanagement.app; 
<a name="l2"><span class="ln">2    </span></a> 
<a name="l3"><span class="ln">3    </span></a></span><span class="s0">import <a
        href="../../../../com/ibr/ticketmanagement/app/util/SystemUiHider.java.html">com.ibr.ticketmanagement.app.util.SystemUiHider</a></span><span
        class="s1">;
<a name="l4"><span class="ln">4    </span></a></span><span class="s0">import <a
        href="../../../../com/ibr/ticketmanagement/app/util/Utilty.java.html">com.ibr.ticketmanagement.app.util.Utilty</a></span><span
        class="s1">;
<a name="l5"><span class="ln">5    </span></a> 
<a name="l6"><span class="ln">6    </span></a></span><span class="s0">import </span><span
        class="s1">android.annotation.TargetApi;
<a name="l7"><span class="ln">7    </span></a></span><span class="s0">import </span><span
        class="s1">android.app.Activity;
<a name="l8"><span class="ln">8    </span></a></span><span class="s0">import </span><span
        class="s1">android.content.Intent;
<a name="l9"><span class="ln">9    </span></a></span><span class="s0">import </span><span
        class="s1">android.os.Build;
<a name="l10"><span class="ln">10   </span></a></span><span class="s0">import </span><span
        class="s1">android.os.Bundle;
<a name="l11"><span class="ln">11   </span></a></span><span class="s0">import </span><span
        class="s1">android.os.Handler;
<a name="l12"><span class="ln">12   </span></a></span><span class="s0">import </span><span
        class="s1">android.view.MotionEvent;
<a name="l13"><span class="ln">13   </span></a></span><span class="s0">import </span><span
        class="s1">android.view.View;
<a name="l14"><span class="ln">14   </span></a> 
<a name="l15"><span class="ln">15   </span></a> 
<a name="l16"><span class="ln">16   </span></a></span><span class="s2">/** 
<a name="l17"><span class="ln">17   </span></a> * An example full-screen activity that shows and hides the system UI (i.e. 
<a name="l18"><span class="ln">18   </span></a> * status bar and navigation/system bar) with user interaction. 
<a name="l19"><span class="ln">19   </span></a> * 
<a name="l20"><span class="ln">20   </span></a> * </span><span class="s3">@see <a
        href="../../../../com/ibr/ticketmanagement/app/util/SystemUiHider.java.html">SystemUiHider</a></span><span
        class="s2">
<a name="l21"><span class="ln">21   </span></a> */</span><span class="s1"> 
<a name="l22"><span class="ln">22   </span></a></span><span class="s0">public class </span><span
        class="s1">SplashScreen </span><span class="s0">extends </span><span class="s1">Activity {
<a name="l23"><span class="ln">23   </span></a> 
<a name="l24"><span class="ln">24   </span></a>    </span><span
        class="s2">// Splash screen timer</span><span class="s1">
<a name="l25"><span class="ln">25   </span></a>    </span><span
        class="s0">private static int </span><span class="s1">SPLASH_TIME_OUT = </span><span
        class="s4">3000</span><span class="s1">;
<a name="l26"><span class="ln">26   </span></a> 
<a name="l27"><span class="ln">27   </span></a>    @Override 
<a name="l28"><span class="ln">28   </span></a>    </span><span
        class="s0">protected void </span><span class="s1">onCreate(Bundle savedInstanceState) {
<a name="l29"><span class="ln">29   </span></a>        </span><span class="s0">super</span><span
        class="s1">.onCreate(savedInstanceState);
<a name="l30"><span class="ln">30   </span></a>        setContentView(<a
            href="R.java.html">R.layout</a>.activity_splash_screen);
<a name="l31"><span class="ln">31   </span></a> 
<a name="l32"><span class="ln">32   </span></a>        </span><span class="s2">//TODO: Make a background request to check the number of tickets, etc.</span><span
        class="s1">
<a name="l33"><span class="ln">33   </span></a>        </span><span class="s0">new </span><span
        class="s1">Handler().postDelayed(</span><span class="s0">new </span><span class="s1">Runnable() {
<a name="l34"><span class="ln">34   </span></a> 
<a name="l35"><span class="ln">35   </span></a>            </span><span class="s2">/* 
<a name="l36"><span class="ln">36   </span></a>             * Showing splash screen with a timer. This will be useful when you 
<a name="l37"><span class="ln">37   </span></a>             * want to show case your app logo / company 
<a name="l38"><span class="ln">38   </span></a>             */</span><span class="s1"> 
<a name="l39"><span class="ln">39   </span></a> 
<a name="l40"><span class="ln">40   </span></a>            @Override 
<a name="l41"><span class="ln">41   </span></a>            </span><span
        class="s0">public void </span><span class="s1">run() {
<a name="l42"><span class="ln">42   </span></a>                </span><span class="s2">// This method will be executed once the timer is over</span><span
        class="s1">
<a name="l43"><span class="ln">43   </span></a>                </span><span class="s2">// Start your app main activity</span><span
        class="s1">
<a name="l44"><span class="ln">44   </span></a> 
<a name="l45"><span class="ln">45   </span></a>                </span><span
        class="s0">if </span><span class="s1">(<a
        href="../../../../com/ibr/ticketmanagement/app/util/Utilty.java.html">Utilty</a>.isLoggedIn(getApplicationContext())) {
<a name="l46"><span class="ln">46   </span></a>                    Intent i = </span><span
        class="s0">new </span><span class="s1">Intent(SplashScreen.</span><span
        class="s0">this</span><span class="s1">, <a href="ActionPlanActivity.java.html">ActionPlanActivity</a>.</span><span
        class="s0">class</span><span class="s1">);
<a name="l47"><span class="ln">47   </span></a>                    startActivity(i); 
<a name="l48"><span class="ln">48   </span></a>                } </span><span
        class="s0">else </span><span class="s1">{
<a name="l49"><span class="ln">49   </span></a>                    Intent i = </span><span
        class="s0">new </span><span class="s1">Intent(SplashScreen.</span><span
        class="s0">this</span><span class="s1">, <a href="LoginActivity.java.html">LoginActivity</a>.</span><span
        class="s0">class</span><span class="s1">);
<a name="l50"><span class="ln">50   </span></a>                    startActivity(i); 
<a name="l51"><span class="ln">51   </span></a>                } 
<a name="l52"><span class="ln">52   </span></a> 
<a name="l53"><span class="ln">53   </span></a>                </span><span class="s2">// close this activity</span><span
        class="s1">
<a name="l54"><span class="ln">54   </span></a>                finish(); 
<a name="l55"><span class="ln">55   </span></a>            } 
<a name="l56"><span class="ln">56   </span></a>        }, SPLASH_TIME_OUT); 
<a name="l57"><span class="ln">57   </span></a>    } 
<a name="l58"><span class="ln">58   </span></a> 
<a name="l59"><span class="ln">59   </span></a>} 
<a name="l60"><span class="ln">60   </span></a></span></pre>
</body>
</html>